﻿<UserControl x:Class="Projecturo.ProjecturoClient.View.DashboardView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="Auto" Width="Auto">
    <DockPanel>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/> 
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            
            <StackPanel Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" Orientation="Horizontal">
                <TextBlock Text="Search Ticket ID"/>
                <TextBox Text="{Binding SearchTicketId}" Style="{StaticResource SearchTicketBox}"/>
                <Button Content="Search" Command="{Binding SearchTicketCommand}"/>
            </StackPanel>
            
            <Border 
                Style="{StaticResource MainBorderStyle}"
                Grid.Row="1"
                Grid.Column="0"
                Grid.RowSpan="3"
                >
                <HeaderedContentControl 
                  Content="{Binding}"
                  ContentTemplate="{StaticResource ProjectListTemplate}"
                  Header="Projects"
                  Style="{StaticResource SubHCCStyle}" HeaderTemplate="{DynamicResource HeaderTemplate_Default}"
                  />
            </Border>
            
            <Border 
                Style="{StaticResource MainBorderStyle}"
                Grid.Row="3"
                Grid.Column="1"
                Grid.ColumnSpan="2"
                >
                <HeaderedContentControl 
                  Content="{Binding}"
                  ContentTemplate="{StaticResource CommandTemplate}"
                  Header="Commands"
                  Style="{StaticResource SubHCCStyle}" HeaderTemplate="{DynamicResource HeaderTemplate_Default}"
                  />
            </Border>
            
            <Border 
                Style="{StaticResource MainBorderStyle}"
                Grid.Row="1"
                Grid.Column="1"
                >
                <HeaderedContentControl 
                  Content="{Binding}"
                  ContentTemplate="{StaticResource RecentlyChangedTicketListTemplate}"
                  Header="Recently Changed Tickets"
                  Style="{StaticResource SubHCCStyle}" HeaderTemplate="{DynamicResource HeaderTemplate_Default}"
                  />
            </Border>
            <Border 
                Style="{StaticResource MainBorderStyle}"
                Grid.Row="1"
                Grid.Column="2"
                >
                <HeaderedContentControl 
                  Content="{Binding}"
                  ContentTemplate="{StaticResource MyOpenTicketListTemplate}"
                  Header="My Open Tickets"
                  Style="{StaticResource SubHCCStyle}" HeaderTemplate="{DynamicResource HeaderTemplate_Default}"
                  />
            </Border>
            <Border 
                Style="{StaticResource MainBorderStyle}"
                Grid.Row="2"
                Grid.Column="1"
                >
                <HeaderedContentControl 
                  Content="{Binding}"
                  ContentTemplate="{StaticResource ReportedByMeTicketListTemplate}"
                  Header="Tickets reported by me"
                  Style="{StaticResource SubHCCStyle}" HeaderTemplate="{DynamicResource HeaderTemplate_Default}"
                  />
            </Border>
            <Border 
                Style="{StaticResource MainBorderStyle}"
                Grid.Row="2"
                Grid.Column="2"
                >
                <HeaderedContentControl 
                  Content="{Binding}"
                  ContentTemplate="{StaticResource NewTicketListTemplate}"
                  Header="New Tickets"
                  Style="{StaticResource SubHCCStyle}" HeaderTemplate="{DynamicResource HeaderTemplate_Default}"
                  />
            </Border>
        </Grid>
    </DockPanel>
</UserControl>
